function main() {
    Java.perform(function x() {


       if(false)
            Java.use("java.util.HashMap").put.implementation = function (k,v){

                var kk = k+'';
                // if(k instanceof Java.use("java.lang.String").class)
                //     console.log('map---->'+k)
                // swanCoreVersion
                // swanNativeVersion
                // swanType
                // if(kk.indexOf('swanCoreVersion') != -1 || kk.indexOf('swanNativeVersion') != -1 || kk.indexOf('swanType') != -1 ){
                if(kk.indexOf('swan') != -1 ){
                    console.log('map---->'+k)
                  //  printStack()
                }
                //   printStack()
                //   if(k instanceof Java.use("java.lang.String").class){

                //       console.log("------------>"+k)
                //       printStack()
                //   }


                return this.put(k,v);
            }

        if(false)
        Java.use("android.widget.TextView").setText.overload('java.lang.CharSequence').implementation = function (text){

            console.log(text);
            printStack()
            //   if(k instanceof Java.use("java.lang.String").class){

            //       console.log("------------>"+k)
            //       printStack()
            //   }
            return this.setText(text);
        }

        // (agent) [5277302043228] Called android.widget.EditText.setText(java.lang.CharSequence, android.widget.TextView$BufferType)

        if(false)
            Java.use("android.widget.EditText").setText.implementation = function (text,bufferType){

                console.log(text);
                printStack()
                //   if(k instanceof Java.use("java.lang.String").class){

                //       console.log("------------>"+k)
                //       printStack()
                //   }
                return this.setText(text,bufferType);
            }
        // com.wuaipojie.crackme01 on (google: 8.1.0) [usb] # (agent) [4681189695946] Called java.lang.String.substring(int, int)
        // (agent) [4681189695946] Arguments java.lang.String.substring(1, 31)


      //  {"swanId":"S8TpwMxMCyHty4oJgMoFTv6umsAWsBUBN3Vm7mw9nLG4ttiYeTqRNS98cbqKBpwVvUWi2s8BrAMSV1Eoir19abmJW","swanIdSignature":"ad9efaa013ae24fb4ecd62614da756a6"}
        if(false)
            Java.use("java.lang.StringBuilder").append.overload('java.lang.String').implementation = function (text){


                //   printStack()
                // swanCoreVersion
                // swanNativeVersion
                // swanType
                if (text.indexOf('swan')!= -1 || true){
                    console.log('str--->'+text);
                    // if(text.indexOf('swanCoreVersion') != -1||text.indexOf('swanNativeVersion') != -1||text.indexOf('swanType') != -1){
                    //     console.log(text);
                    //     printStack()
                    // }
                }

                return this.append(text);
            }

        if(false)
            Java.use("android.app.Dialog").show.implementation = function (text){

                printStack()
                //   if(k instanceof Java.use("java.lang.String").class){

                //       console.log("------------>"+k)
                //       printStack()
                //   }
                return this.show();
            }


        if(false)
            Java.use("android.os.Environment").getExternalStorageDirectory.implementation = function (){

                printStack()
                //   if(k instanceof Java.use("java.lang.String").class){

                //       console.log("------------>"+k)
                //       printStack()
                //   }
                return this.getExternalStorageDirectory();
            }

        if(false)
            Java.use("android.app.AlertDialog").show.implementation = function (text){

                printStack()
                //   if(k instanceof Java.use("java.lang.String").class){

                //       console.log("------------>"+k)
                //       printStack()
                //   }
                return this.show();
            }


        //
        if(false)
            Java.use("java.util.LinkedHashMap").put.implementation = function (k,v){
                console.log(k+"--->"+v)
                //    printStack()
                //   if(k instanceof Java.use("java.lang.String").class){

                //       console.log("------------>"+k)
                //       printStack()
                //   }
                return this.put(k,v);
            }
        // Lcom/alibaba/fastjson/JSON;->parseObject

        // com.alibaba.fastjson.JSON.parseObject(java.lang.String, java.lang.reflect.Type, [Lcom.alibaba.fastjson.parser.Feature;)

        if(false)
            Java.use("com.alibaba.fastjson.JSON").parseObject  .overload('java.lang.String', 'java.lang.reflect.Type', '[Lcom.alibaba.fastjson.parser.Feature;').implementation = function (p1,p2,p3){
                console.log(p1)
                //    printStack()
                //   if(k instanceof Java.use("java.lang.String").class){

                //       console.log("------------>"+k)
                //       printStack()



                //   }
                return this.parseObject(p1,p2,p3);
            }


        if(false)
            Java.use("java.io.File").parseObject  .overload('java.lang.String', 'java.lang.reflect.Type', '[Lcom.alibaba.fastjson.parser.Feature;').implementation = function (p1,p2,p3){
                console.log(p1)
                //    printStack()
                //   if(k instanceof Java.use("java.lang.String").class){

                //       console.log("------------>"+k)
                //       printStack()



                //   }
                return this.parseObject(p1,p2,p3);
            }



            Java.use("org.cocos2dx.easyndk.AndroidNDKHelper").RecieveCppMessage.implementation = function (p1 ,p2){
                console.log("p1--->",p1)
                console.log("p2--->",p2)
                printStack()

                return this.RecieveCppMessage(p1,p2);
            }


    })




}





function printStack() {
    var Exception = Java.use("java.lang.Exception");
    var ins = Exception.$new("Exception");
    var straces = ins.getStackTrace();
    if (straces != undefined && straces != null) {
        var strace = straces.toString();
        var replaceStr = strace.replace(/,/g, "\r\n");
        console.log("=============================Stack strat=======================");
        console.log(replaceStr);
        console.log("=============================Stack end=======================\r\n");
        Exception.$dispose();
    }
}

setImmediate(main)


//frida -U -f com.immomo.momo --no-pause -l sys
//frida -U -f com.kaiqigu.wuniangwaizhuan.mi --no-pause -l sys
//frida -U com.kugou.android -l sys
//frida -U com.kingkong.dxmovie -l sys
//frida -U com.yzj.ugirls -l sys
//frida -U com.game.lostroutes -l sys
//frida -U com.baidu.searchbox -l sys
//app.maomiav.com com.yzj.ugirls
// com.kugou.android
//frida -U -f com.immomo.momo --no-pause -l sys D
//frida -U -f com.immomo.momo --no-pause -l sys D
// objection -g com.kugou.android explore


//com.caratlover
//frida -U -f com.caratlover --no-pause -l sys
//frida -U -f c0i.gamev4 --no-pause -l sys
//frida -U -f com.baidu.searchbox --no-pause -l sys




